﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<BusinessComponents.ReservationMaster>>" %>

    <table>
        <tr>
            <th></th>
            <th>
                Reservation ID
            </th>
            <th>
                Customer Name
            </th>
            <th>
                Check-in Date
            </th>
            <th>
                No. of Pax
            </th>
            <th>
                Reservation Status
            </th>
            <th>
                Create Time
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Detail", "Details", new { id=item.ReservationId })%>
            </td>
            <td>
                <%: item.ReservationId %>
            </td>
            <td>
                <%: item.Customer.UserName %>
            </td>
            <td>
                <%: item.StartDate.ToString("dd MMM yyyy")%>
            </td>
            <td>
                <%: item.NoOfPax%>
            </td>
            <td>
                <%: item.StatusDesc %>
            </td>
            <td>
                <%: item.CreatedDateTime.ToString("dd MMM yyyy, HH:mm:ff")%>
            </td>
        </tr>
    
    <% } %>

    </table>